package com.sunwayworld.basemodule.business.qualitycontrol.qualitycontrolresult.resource;

import com.alibaba.fastjson.JSONObject;
import com.sunwayworld.basemodule.business.qualitycontrol.qualitycontrolresult.bean.LimsQualitycontrolTestResultManageBean;
import com.sunwayworld.basemodule.business.qualitycontrol.qualitycontrolresult.service.LimsQualitycontrolTestResultManageService;
import com.sunwayworld.framework.data.page.Page;
import com.sunwayworld.framework.log.annotation.Log;
import com.sunwayworld.framework.log.annotation.LogType;
import com.sunwayworld.framework.restful.data.RestJsonWrapperBean;
import com.sunwayworld.framework.support.base.resource.GenericResource;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@RequestMapping("/secure/basemodule/business/qualitycontrol/qualitycontrol-test-result-manages")
public interface LimsQualitycontrolTestResultManageResource extends GenericResource<LimsQualitycontrolTestResultManageService, LimsQualitycontrolTestResultManageBean, Long> {

    @Log(value = "按质控物批号、质控物水平、质控物项目名称分组，加上每组的结果平均数、结果标准差", type = LogType.SELECT)
    @RequestMapping(value = "/queries-distinctrows", method = RequestMethod.POST)
    Page<LimsQualitycontrolTestResultManageBean> queriesDistinctRows(RestJsonWrapperBean wrapper);

    @PostMapping(value = "/saveto-managesavetable")
    JSONObject saveToManageSaveTable(RestJsonWrapperBean wrapper);

    @PostMapping(value = "/set-removestatus")
    JSONObject setRemoveStatus(RestJsonWrapperBean wrapperBean);
}
